import {useState} from 'react'
export default ()=>{
    const [time,setTime]=useState(()=>{
        const date=new Date()
        return{
            year:date.getFullYear(),
            month:date.getMonth()+1,
            day:date.getDate()
        }
    })
    return (<div>
        <div>年份:{time.year}</div>
        <div>月份:{time.month}</div>
        <div>月份:{time.day}</div>
    </div>)
}